//
//  UIColor+JXE.swift
//  JXUtilsDemo
//
//  Created by ccks on 2018/11/28.
//  Copyright © 2018 Zhu Jinxin. All rights reserved.
//

import Foundation
import UIKit

extension JX_TypeWrapper where T : UIColor {
    
    static func RGBA_COLOR(red:CGFloat , green:CGFloat,blue:CGFloat,alpha:CGFloat) -> UIColor {
        
        return UIColor(red: red/255.0, green:green/255.0 , blue: blue/255.0, alpha: alpha)
        
    }
    
    static func HEX_COLOR(HEX_Value: Int , alpha:CGFloat) -> (UIColor) {
        return UIColor(red: ((CGFloat)((HEX_Value & 0xFF0000) >> 16)) / 255.0,
                       green: ((CGFloat)((HEX_Value & 0xFF00) >> 8)) / 255.0,
                       blue: ((CGFloat)(HEX_Value & 0xFF)) / 255.0,
                       alpha: alpha)
    }
    
}
